<template>
 <div class="btn-bar">
     <div class="bar-item bar-right">
         <div class="cart" @click="addCart">加入购物车</div>
         <div class="buy"></div>
     </div>
 </div>
</template>

<script>
 export default {
   data () {
     return {

     }
   },
   created() {

   },
   methods: {
       addCart() {
           this.$emit('addToCart')
       }
   }
 }
</script>

<style scoped>
.btn-bar {
    height: 49px;
    background-color: red;

    position: fixed;
    left: 0;
    right: 0;
    bottom: 49px;
}
 
</style>
